<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">		
		
	</head>
	<body>
		<div id="test1"></div>
		<div id="test2"></div>
	</body>
	<script type="text/javascript">
		var test1 = document.getElementById('test1')
		var test2 = document.getElementById('test2')
		var num1 = 0;
		var num2 = 0;
		window.addEventListener('devicemotion',function(){
			test1.innerHTML = num1++
		},true)
		
		setInterval(function(){
			test2.innerHTML = num2++
		},16)
		
		
		
	</script>
</html>
